// xc/components/widgets/examstatus.js
Component({
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    show:false,
    basicurl: getApp().globalData.basicurl
  },
  ready(){
    var app = getApp()

    if(!app.globalData.basicurl || app.globalData.basicurl==-1){
  
      this.setbasicurl()
    }else{
      this.setData({
        basicurl:app.globalData.basicurl
      })
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClose(){
      this.setData({
        show:false
      })
    },
    onClickBtn(e){
     var data= e.currentTarget.dataset
     
     data['ordernum'] =this.data.ordernum
       this.triggerEvent("btnop",data)
       this.setData({
        show:false
      })
    },
    setbasicurl(){
      console.log("ddd")
      var that=this;
      var app = getApp()
     
      var basicurl=app.globalData["xcsys"]['basicurl']+'/addons/'+app.globalData["xcsys"]['m']+'/';
      that.setData({basicurl:basicurl})
      app.globalData.basicurl=basicurl;
     
    },
     init(examstatus,reason="",ordernum=""){
       this.setData({
         show:true,
         examstatus:examstatus,
         reason:reason,
         ordernum
       })
     },
     
  }
})
